home *** CD-ROM | disk | FTP | other *** search
/ Stolen Data 3 / Stolen Data 3.adf / MAG-TEXT / CODE3a < prev    next >
Text File  |  1989-01-01  |  826b  |  31 lines

  1. difference  between  using Rs to create
  2. variable    lists   rather   than   Dc.
  3. Remember  these  labels we have created
  4. are  just offsets, but if we reserve an
  5. area   of   memory   large   enough  to
  6. accomodate   the  variables,  and  then
  7. assign  an  address  register  to  this
  8. memory   area,  we  can  refer  to  the
  9. variables VIA the address register.  So
  10. instead of Move Xcoord,d0 we might have
  11. Move Xcoord(a5),d0 ,this is much faster
  12. than  absolute addressing (although the
  13. same  speed  as  PC  relative  but dont
  14. forget   you   can't  use  PC  relative
  15. addressing  mode in the second operand)
  16. and more memory efficient.
  17.  
  18. Examples.  A variable list definition
  19.  
  20.        Rsreset
  21. Coords    Rs.w 3
  22. Counter   Rs.w 1
  23. Intvec    Rs.l 1
  24. Varisize  Rs.b 0
  25.  
  26. Variables  Dcb.b Varisize
  27.  
  28. ;------ Memory allocation
  29.  
  30.         Rsset $70000
  31.